package com.sangfor.bugreport;

import android.content.Context;
import com.sangfor.bugreport.breakpad.BreakpadUtils;
import com.sangfor.bugreport.logger.Log;

/* loaded from: classes2.dex */
public class BugReport {
    private static final String TAG = "BugReport";

    public static void initAll(Context context) {
        initAll(context, true);
    }

    public static void initAll(Context context, boolean z) {
        Log.info(TAG, "initAll");
        try {
            Log.init(context);
            String str = Log.getmCrashLogDir();
            if (z) {
                Log.info(TAG, "initBreakpad");
                BreakpadUtils.initBreakpad(str, Log.getProcessName(context).replace(':', '-'));
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
